<include file="public@header"/>
</head>
<body>
<div class="wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a>志愿者管理</a></li>
    </ul>
    <form class="well form-inline margin-top-20" method="post" action="{:url('volunteer/adminVolunteer/index')}">
        姓名：
        <input class="form-control" type="text" name="name" style="width: 200px;" value="{:input('request.name')}"
               placeholder="请输入姓名">
        电话：
        <input class="form-control" type="tel" name="phone" style="width: 200px;" value="{:input('request.phone')}"
               placeholder="电话">
        <input type="submit" class="btn btn-primary" value="搜索"/>
        <a class="btn btn-danger" href="{:url('volunteer/adminVolunteer/index')}">清空</a>
    </form>
    <form method="post" class="js-ajax-form">
        <table class="table table-hover table-bordered">
            <thead>
            <tr>
                <th>ID</th>
                <th>志愿者账号</th>
                <th>姓名</th>
                <th>性别</th>
                <th>照片</th>
                <th>手机</th>
                <th>生日</th>
                <th>状态</th>
                <th>{:lang('ACTIONS')}</th>
            </tr>
            </thead>
            <tbody>

            <foreach name="list" item="vo">
                <tr>
                    <td>{$vo.id}</td>
                    <td>{$vo['username']}
                    </td>
                    <td>{$vo['name']}</td>
                    <td>{$vo.sex}</td>
                    <td><a href="javascript:parent.imagePreviewDialog('{:cmf_get_image_preview_url($vo.photo)}');"><img
                            width="80" height="auto" src="{:cmf_get_image_url($vo['photo'])}"/></a></td>
                    <td>{$vo.phone}</td>
                    <td>{$vo.birthday}</td>
                    <td>
                        <if condition="$vo['status'] == 0">
                            等待审核
                        </if>
                        <if condition="$vo['status'] == 1">
                            通过审核
                        </if>
                        <if condition="$vo['status'] == 3">
                            驳回审核
                        </if>
                    </td>
                    <td>
                        <a href="{:url('volunteer/adminVolunteer/check',array('id'=>$vo['id']))}"
                           data-msg="审核志愿者">审核志愿者</a>
                        <if condition="$vo.status == 1">
                            <a href="{:url('volunteer/adminVolunteer/logs',array('id'=>$vo['id']))}"
                               data-msg="活动记录">活动记录</a>
                        </if>

                    </td>
                </tr>
            </foreach>
            </tbody>
        </table>
        <div class="pagination">{$page}</div>
    </form>
</div>
<script src="__STATIC__/js/admin.js"></script>
</body>
</html>